package com.project.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

/**
 * 销售表实体类
 */

@Data
@Api(tags = "销售视图")
@TableName(value = "sys_sell")
public class SellBean {

    @ApiModelProperty(value = "编号",hidden = true)
    @TableId(value = "pk_sellId")
    private int id;

    @ApiModelProperty(value = "配送地址")
    private String sendAddress;

    @ApiModelProperty(value = "销售日期")
    private LocalDate sellDate=LocalDate.now();
    private int sellMoney;
    @TableField(exist = false)
    private UserBean user;
    @TableField(exist = false)
    private ClientBean client;
    @TableField(exist = false)
    private List<SellProductBean> infoList;


    public SellBean() {
    }

    public SellBean(String sendAddress, int sellMoney, int userId, int  clientId) {
        this.sendAddress = sendAddress;
        this.sellMoney = sellMoney;
        this.user = new UserBean();
        this.user.setId(userId);
        this.client = new ClientBean();
        this.client.setId(clientId);
    }
}
